package com.app.data;

import java.util.ArrayList;

public class ExistMethodNode {

	private String className;
	private ArrayList<Methods> childNodes = new ArrayList<>(); 
	
	public ExistMethodNode(String className) {
		this.className = className;
	}
	
	public String getClassName() {
		return className;
	}
	
	public void addMethods(Methods m) {
		boolean isExist = false;
		for (Methods exist : childNodes)
			if (exist.equalsFullName(m))
				isExist = true;
		if (!isExist)
			childNodes.add(m);
	}
	
	public ArrayList<Methods> getChildNodes() {
		return childNodes;
	}
	
	public String toString() {
		return className;
	}
}
